﻿using Microsoft.EntityFrameworkCore.Migrations;

namespace NFine.EntityFramework.Migrations
{
    public partial class Modified_Region_Attribute_Type : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterColumn<decimal>(
                name: "Longitude",
                table: "sys_region",
                type: "decimal(10,7)",
                nullable: true,
                oldClrType: typeof(float));

            migrationBuilder.AlterColumn<int>(
                name: "Layers",
                table: "sys_region",
                maxLength: 255,
                nullable: true,
                oldClrType: typeof(int),
                oldMaxLength: 255);

            migrationBuilder.AlterColumn<decimal>(
                name: "Latitude",
                table: "sys_region",
                type: "decimal(10,7)",
                nullable: true,
                oldClrType: typeof(float));
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterColumn<float>(
                name: "Longitude",
                table: "sys_region",
                nullable: false,
                oldClrType: typeof(decimal),
                oldType: "decimal(10,7)",
                oldNullable: true);

            migrationBuilder.AlterColumn<int>(
                name: "Layers",
                table: "sys_region",
                maxLength: 255,
                nullable: false,
                oldClrType: typeof(int),
                oldMaxLength: 255,
                oldNullable: true);

            migrationBuilder.AlterColumn<float>(
                name: "Latitude",
                table: "sys_region",
                nullable: false,
                oldClrType: typeof(decimal),
                oldType: "decimal(10,7)",
                oldNullable: true);
        }
    }
}
